Optimal. Leaf size=169 \[ \frac {1}{2} a \left (a^4+10 a^2 b^2-15 b^4\right ) x-\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\sin (c+d x))}{d}+\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3167, 1819,
1816, 649, 209, 266} \begin {gather*} -\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\sin (c+d x))}{d}+\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\sin ^2(c+d x) \left (a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)+b \left (5 a^4-10 a^2 b^2+b^4\right )\right )}{2 d}+\frac {1}{2} a x \left (a^4+10 a^2 b^2-15 b^4\right )+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 266
Rule 649
Rule 1816
Rule 1819
Rule 3167
Rubi steps
\begin {align*} \int \sec ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx &=-\frac {\text {Subst}\left (\int \frac {(b+a x)^5}{x^3 \left (1+x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {\text {Subst}\left (\int \frac {-2 b^5-10 a b^4 x-2 b^3 \left (10 a^2-b^2\right ) x^2-a \left (a^4+10 a^2 b^2-5 b^4\right ) x^3}{x^3 \left (1+x^2\right )} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {\text {Subst}\left (\int \left (-\frac {2 b^5}{x^3}-\frac {10 a b^4}{x^2}-\frac {4 \left (5 a^2 b^3-b^5\right )}{x}+\frac {-a \left (a^4+10 a^2 b^2-15 b^4\right )+4 b^3 \left (5 a^2-b^2\right ) x}{1+x^2}\right ) \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d}+\frac {\text {Subst}\left (\int \frac {-a \left (a^4+10 a^2 b^2-15 b^4\right )+4 b^3 \left (5 a^2-b^2\right ) x}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d}+\frac {\left (2 b^3 \left (5 a^2-b^2\right )\right ) \text {Subst}\left (\int \frac {x}{1+x^2} \, dx,x,\cot (c+d x)\right )}{d}-\frac {\left (a \left (a^4+10 a^2 b^2-15 b^4\right )\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{2 d}\\ &=\frac {1}{2} a \left (a^4+10 a^2 b^2-15 b^4\right ) x-\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\sin (c+d x))}{d}+\frac {2 b^3 \left (5 a^2-b^2\right ) \log (\tan (c+d x))}{d}+\frac {\left (b \left (5 a^4-10 a^2 b^2+b^4\right )+a \left (a^4-10 a^2 b^2+5 b^4\right ) \cot (c+d x)\right ) \sin ^2(c+d x)}{2 d}+\frac {5 a b^4 \tan (c+d x)}{d}+\frac {b^5 \tan ^2(c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(571\) vs. \(2(169)=338\).
time = 6.38, size = 571, normalized size = 3.38 \begin {gather*} \frac {b^3 \left (\frac {\cos ^2(c+d x) (a+b \tan (c+d x))^6 \left (b^2+a b \tan (c+d x)\right )}{2 b^4 \left (a^2+b^2\right )}-\frac {\left (-6 a^2+4 b^2\right ) \left (\frac {1}{2} \left (5 a^4-10 a^2 b^2+b^4+\frac {a^5-10 a^3 b^2+5 a b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\frac {1}{2} \left (5 a^4-10 a^2 b^2+b^4-\frac {a^5-10 a^3 b^2+5 a b^4}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+5 a b \left (2 a^2-b^2\right ) \tan (c+d x)+\frac {1}{2} b^2 \left (10 a^2-b^2\right ) \tan ^2(c+d x)+\frac {5}{3} a b^3 \tan ^3(c+d x)+\frac {1}{4} b^4 \tan ^4(c+d x)\right )+5 a \left (\frac {1}{2} \left (6 a^5-20 a^3 b^2+6 a b^4+\frac {a^6-15 a^4 b^2+15 a^2 b^4-b^6}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\frac {1}{2} \left (6 a^5-20 a^3 b^2+6 a b^4-\frac {a^6-15 a^4 b^2+15 a^2 b^4-b^6}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )+b \left (15 a^4-15 a^2 b^2+b^4\right ) \tan (c+d x)+a b^2 \left (10 a^2-3 b^2\right ) \tan ^2(c+d x)+\frac {1}{3} b^3 \left (15 a^2-b^2\right ) \tan ^3(c+d x)+\frac {3}{2} a b^4 \tan ^4(c+d x)+\frac {1}{5} b^5 \tan ^5(c+d x)\right )}{2 b^2 \left (a^2+b^2\right )}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.40, size = 209, normalized size = 1.24 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 179, normalized size = 1.06 \begin {gather*} \frac {10 \, a^{4} b \sin \left (d x + c\right )^{2} + {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{5} + 10 \, {\left (2 \, d x + 2 \, c - \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} b^{2} - 20 \, {\left (\sin \left (d x + c\right )^{2} + \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} a^{2} b^{3} - 10 \, {\left (3 \, d x + 3 \, c - \frac {\tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1} - 2 \, \tan \left (d x + c\right )\right )} a b^{4} + 2 \, {\left (\sin \left (d x + c\right )^{2} - \frac {1}{\sin \left (d x + c\right )^{2} - 1} + 2 \, \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} b^{5}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.89, size = 177, normalized size = 1.05 \begin {gather*} \frac {2 \, b^{5} - 2 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} - 8 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5} + 2 \, {\left (a^{5} + 10 \, a^{3} b^{2} - 15 \, a b^{4}\right )} d x\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (10 \, a b^{4} \cos \left (d x + c\right ) + {\left (a^{5} - 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 173, normalized size = 1.02 \begin {gather*} \frac {b^{5} \tan \left (d x + c\right )^{2} + 10 \, a b^{4} \tan \left (d x + c\right ) + {\left (a^{5} + 10 \, a^{3} b^{2} - 15 \, a b^{4}\right )} {\left (d x + c\right )} + 2 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {10 \, a^{2} b^{3} \tan \left (d x + c\right )^{2} - 2 \, b^{5} \tan \left (d x + c\right )^{2} - a^{5} \tan \left (d x + c\right ) + 10 \, a^{3} b^{2} \tan \left (d x + c\right ) - 5 \, a b^{4} \tan \left (d x + c\right ) + 5 \, a^{4} b - b^{5}}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.53, size = 354, normalized size = 2.09 \begin {gather*} \frac {2\,\left (b^5\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )-b^5\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )+\frac {a^5\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}-5\,a^2\,b^3\,\ln \left (\frac {\cos \left (c+d\,x\right )}{\cos \left (c+d\,x\right )+1}\right )-\frac {15\,a\,b^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+5\,a^2\,b^3\,\ln \left (\frac {1}{{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}\right )+5\,a^3\,b^2\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\right )}{d}+\frac {\frac {5\,a^4\,b}{16}+\frac {9\,b^5}{16}-\frac {5\,a^2\,b^3}{8}-\frac {b^5\,\cos \left (4\,c+4\,d\,x\right )}{16}+\frac {a^5\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {a^5\,\sin \left (4\,c+4\,d\,x\right )}{16}-\frac {5\,a^4\,b\,\cos \left (4\,c+4\,d\,x\right )}{16}+\frac {25\,a\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{8}+\frac {5\,a\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{16}+\frac {5\,a^2\,b^3\,\cos \left (4\,c+4\,d\,x\right )}{8}-\frac {5\,a^3\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4}-\frac {5\,a^3\,b^2\,\sin \left (4\,c+4\,d\,x\right )}{8}}{d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________